package com.example.entity;

import jakarta.persistence.Id;
import jakarta.persistence.Table;
import jakarta.persistence.Transient;
import java.io.Serial;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * (CommodityOrder)实体类
 *
 * @author 游家纨绔
 * @since 2023-09-05 23:30:00
 */
@Data
@Builder
@AllArgsConstructor
@NoArgsConstructor
@Table(name = "second_kill_order")
public class SecKillOrder implements Serializable {
	@Serial
	private static final long serialVersionUID = 999104004175179701L;

	/**
	 * 订单Id
	 */
	@Id
	private Integer id;
	/**
	 * 用户Id
	 */
	private Integer userId;
	/**
	 * 商品Id
	 */
	private Integer spuId;
	/**
	 * 规格Id
	 */
	private Integer skuId;
	/**
	 * 创建时间
	 */
	private Date gmtCreate;
	/**
	 * 修改时间
	 */
	private Date gmtModified;

	@Transient
	private List<SecKillSpu> spuList = new ArrayList<>();

}
